<template>
  <div>
    Email:<input type="text" v-model="info.email">
    Pwd:<input type="text" v-model="info.pwd">
    <button @click="register">注册</button>
    <button @click="submit">登录</button>
    <img src="
https://wyh-777.oss-cn-nanjing.aliyuncs.com/f80cc924f55c426a963bcec88331642d.jpg" width="200" height="200" alt="">
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data() {
    return {
      info: {
        email: "",
        pwd: ""
      }
      , img: ""
    }
  },
  created() {
    axios.get().then(resp => {
      console.log(resp.data);
    })

  },
  methods: {
    register() {
      axios.post("http://localhost:8080/user/submit", this.info).then(resp => {
        console.log(resp.data);

      })
    },
    submit() {
      axios.post("http://localhost:8080/user/loginUser", this.info).then(resp => {
        console.log(resp.data);

      })
    }
  }
}
</script>

<style scoped>

</style>